# Contributor: Bart Ribbers <bribbers@disroot.org>

# The group tag is just to easily find this APKBUILD by some scripts for automation
# group=kde-applications
maintainer="team/kde <bribbers@disroot.org>"
pkgname=akregator
pkgver=24.08.2
pkgrel=0
# armhf blocked by extra-cmake-modules
# armv7, ppc64le, s390x and riscv64 blocked by qt6-qtwebengine
# loongarch64 blocked by pimcommon
arch="all !armhf !armv7 !ppc64le !s390x !riscv64 !loongarch64"
url="https://apps.kde.org/akregator/"
pkgdesc="RSS Feed Reader"
license="GPL-2.0-or-later AND LGPL-2.0-or-later"
makedepends="
	akonadi-mime-dev
	extra-cmake-modules
	grantlee-dev
	grantleetheme-dev
	kcmutils-dev
	kcrash-dev
	kdoctools-dev
	kiconthemes-dev
	knotifications-dev
	knotifyconfig-dev
	kontactinterface-dev
	kparts-dev
	kpimtextedit-dev
	kstatusnotifieritem-dev
	ktextaddons-dev
	ktexteditor-dev
	kxmlgui-dev
	libkdepim-dev
	libkleo-dev
	messagelib-dev
	pimcommon-dev
	qt6-qtbase-dev
	qt6-qtwebengine-dev
	samurai
	syndication-dev
	"
checkdepends="xvfb-run"
subpackages="$pkgname-doc $pkgname-lang"
_repo_url="https://invent.kde.org/pim/akregator.git"
source="https://download.kde.org/stable/release-service/$pkgver/src/akregator-$pkgver.tar.xz"

build() {
	cmake -B build -G Ninja \
		-DCMAKE_BUILD_TYPE=MinSizeRel \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib
	cmake --build build
}

check() {
	xvfb-run ctest --test-dir build --output-on-failure
}

package() {
	DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
07ba02eae8a8748b01ca6d6e40e6ce56d47385f0bcd1f6755b986a4687671b62a3e6ece3cd597abd2725cdb70fd353f78b6cb7124bff76a6406b27a6a25d2dc1  akregator-24.08.2.tar.xz
"
